<?php
	include("Library.php");
	$filename=NV_ROOTDIR."/modules/".$module_name."/admin/config.xml";
	$xml=new xmlLibrary();
	$dom=new DOMDocument();
	$dom->load($filename);
	$root=$dom->documentElement;
	if(isset($_POST['exec']))
	{
		if(isset($_POST['deleteNews']))
		{
			$xml->UpdateNodeValue($dom,$filename,'deleteNews',$_POST['deleteNews'],$root);
		}
		else
		{
			$xml->UpdateNodeValue($dom,$filename,'deleteNews','false',$root);
		}
	}
	$deleteNews=$xml->GetValueFromXpath("deleteNews",$filename);
$contents='
<form action="index.php?nv=getnews&op=config" method="post" name="frmConfig"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="51%">Xóa bỏ những tin quá hạn</td>
    <td width="49%"><input type="checkbox" name="deleteNews" id="deleteNews" value="true"/>
      <label for="deleteNews"></label></td>
  </tr>
  <tr>
    <td colspan="2" align="center"><input name="exec" type="submit" value="Thực hiện" /></td>
  </tr>
</table>
</form>
<script type="text/javascript">
document.frmConfig.deleteNews.checked='.$deleteNews.';
</script>
';
?>
<?php
	include ( NV_ROOTDIR . "/includes/header.php" );
	echo nv_admin_theme($contents);
	include ( NV_ROOTDIR . "/includes/footer.php" );
?>
 